home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 729 / bbbbs / bbbbs54.lzh / rexx / Contents.rexx < prev    next >
OS/2 REXX Batch file  |  1992-04-21  |  922b  |  33 lines

  1. /*       $VER: 5.1 Contents.rexx 21 Apr 1992 (21.4.92)
  2. copyright 1990-92 Richard Lee Stockton  FREELY DISTRIBUTABLE
  3.  
  4.      Required in C: directory   arc dms lha unzip zoo
  5. */
  6.  
  7. PARSE ARG argname emptyflag .
  8.  
  9. IF emptyflag~=1 THEN CALL DELETE('RAM:CONTENTS')
  10. endtest=UPPER(RIGHT(argname,4))
  11. arcomm=''
  12. IF endtest='.ARC' THEN arcomm='arc'
  13. IF endtest='.ZOO' THEN arcomm='zoo'
  14. IF arcomm~=''     THEN arcomm=arcomm 'v' argname
  15. ELSE IF endtest='.DMS' THEN arcomm='dms VIEW' argname
  16. ELSE IF endtest='.ZIP' THEN arcomm='unzip -v' argname
  17. ELSE IF endtest='.LHA' | endtest='.LZH' | endtest='.RUN' THEN
  18.   arcomm='lha -N v' argname
  19. arcomm='CD RAM:' || '0A'x || arcomm
  20. IF emptyflag~=1 THEN
  21.   DO
  22.     CALL CLOSE(STDOUT)
  23.     CALL OPEN(STDOUT,'RAM:CONTENTS','W')
  24.   END
  25. ADDRESS COMMAND arcomm
  26. IF emptyflag~=1 THEN
  27.   DO
  28.     CALL CLOSE(STDOUT)
  29.     IF WORD(STATEF('RAM:CONTENTS'),2)=0 THEN CALL Contents.rexx(argname 1)
  30.   END
  31.  
  32. /* Contents.rexx */
  33.